 #!/usr/bin/perl
use warnings;
use strict;
use Cwd;

 
use Time::SoFar qw( runtime runinterval figuretimes ); 
use Statistics::R ;
my $R = Statistics::R->new() ;
 
my $elapsed = runtime();

	chdir("C:/carmd-cvs02/Koala");
	my $dir=getcwd;
	print "current work directory= $dir, \n\n";

$R->startR ;
my $sincethen = runinterval(1);
print "=== Starting R: $sincethen seconds\n";

$elapsed = runtime();

	my $ret = $R->read ;
	print "$ret \n\n";
	
	$R->send(q'source("C:/carmd-cvs02/Koala/summary_scripts_R/process_capability.R")');
	#$R->send(q'source("./process.capability/process_capability.R")');
  	$ret = $R->read;
  	####################
    
  	print "$ret \n\n";
    
  	########################
  
$sincethen = runinterval(1);
print "=== run R script: $sincethen seconds\n";

$elapsed = runtime();
  $R->stopR() ;
  print "=== Close R: $sincethen seconds\n";
  
  